import request from "@/utils/request";
import qs from "qs";

export let getlist = params => {
  return request({
    url: "/classify/list",
    method: "get",
    params: params || {},
    baseURL: "http://localhost:2345"
  });
};

export let addlist = data => {
  return request({
    url: "/classify/addList",
    method: "post",
    data: qs.stringify(data),
    baseURL: "http://localhost:2345"
  });
};

export let updatelist = data => {
  return request({
    url: "/classify/updateList",
    method: "post",
    data: qs.stringify(data),
    baseURL: "http://localhost:2345"
  });
};

export let deletelist = id => {
  return request({
    url: "/classify/delList",
    method: "get",
    params: { id },
    baseURL: "http://localhost:2345"
  });
};
